<#if baseUrl??>
<#assign path=baseUrl />
<#elseif request??>
<#assign path=request.contextPath /> <#--path的目的是为了得到项目名-->
</#if>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <base href="${path}/">
    <title>Insert title here</title>
    <link rel="stylesheet" href="bootstrap-3.3.7/css/bootstrap.css">
    <script type="text/javascript" src="bootstrap-3.3.7/js/jquery.js"></script>
    <script type="text/javascript" src="bootstrap-3.3.7/js/bootstrap.js"></script>
    <script>
        function fenye(cpage) {
            $("[name='cpage']").val(cpage)
            $("form").submit();
        }

        function delAll() {
            var ids = "";
            $(".ck:checked").each(function () {
                ids += "," + $(this).val();
            })
            if (ids) {
                ids = ids.substring(1);
                alert(ids)

            }
            var ss = confirm("确定删除角色吗")
            if(ss){
                location.href = "user/delAll?ids=" + ids;
            }

        }

    </script>
</head>
<body>
    <form action="/user/list" method="post" style="padding-top: 20px">
        <input type="hidden" name="cpage" value="1">
        名称：<input type="text" name="keyword" value="${keyword!}">
        <input type="submit" value="查询" class="btn btn-success">
    </form>
    <table class="table table-bordered table-responsive" style="padding-top: 15px">
        <tr>
            <td>请选择</td>
            <td>用户名</td>
            <td>生日</td>
            <td>性别</td>

            <td>角色名</td>
        </tr>
        <#list uList as u>
            <tr>
                <td>
                    <input type="checkbox" class="ck" name="ck" value="${u.uid!}">
                </td>
                <td>${u.uname!}</td>
                <td>${u.udate!}</td>
                <td>${u.usex!}</td>

                <td>${u.proty!}</td>
            </tr>
        </#list>
        <tr>
            <td colspan="15">
                <input type="button" class="btn btn-danger" onclick="delAll()" value="批删">
                ${p.pageUrl}
            </td>
        </tr>
    </table>
</body>
</html>
